package com.wao.product.service.dto;


import javax.validation.constraints.*;
import java.io.Serializable;
import java.util.Objects;

/**
 * A DTO for the Property entity.
 */
public class PropertyDTO implements Serializable {

    private Long id;

    @NotNull
    private String name;

    @NotNull
    private Boolean aliasEnabled;

    @NotNull
    private Boolean colorPro;

    @NotNull
    private Boolean enumPro;

    @NotNull
    private Boolean inputPro;

    @NotNull
    private Boolean skuPro;

    @NotNull
    private Boolean searchable;

    @NotNull
    private Boolean filterable;

    @NotNull
    private Boolean required;

    @NotNull
    private Boolean multable;

    @NotNull
    private Boolean enabled;

    private Integer displayOrder;

    @Size(max = 8)
    private String langKey;

    @NotNull
    private Long categoryId;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Boolean isAliasEnabled() {
        return aliasEnabled;
    }

    public void setAliasEnabled(Boolean aliasEnabled) {
        this.aliasEnabled = aliasEnabled;
    }

    public Boolean isColorPro() {
        return colorPro;
    }

    public void setColorPro(Boolean colorPro) {
        this.colorPro = colorPro;
    }

    public Boolean isEnumPro() {
        return enumPro;
    }

    public void setEnumPro(Boolean enumPro) {
        this.enumPro = enumPro;
    }

    public Boolean isInputPro() {
        return inputPro;
    }

    public void setInputPro(Boolean inputPro) {
        this.inputPro = inputPro;
    }

    public Boolean isSkuPro() {
        return skuPro;
    }

    public void setSkuPro(Boolean skuPro) {
        this.skuPro = skuPro;
    }

    public Boolean isSearchable() {
        return searchable;
    }

    public void setSearchable(Boolean searchable) {
        this.searchable = searchable;
    }

    public Boolean isFilterable() {
        return filterable;
    }

    public void setFilterable(Boolean filterable) {
        this.filterable = filterable;
    }

    public Boolean isRequired() {
        return required;
    }

    public void setRequired(Boolean required) {
        this.required = required;
    }

    public Boolean isMultable() {
        return multable;
    }

    public void setMultable(Boolean multable) {
        this.multable = multable;
    }

    public Boolean isEnabled() {
        return enabled;
    }

    public void setEnabled(Boolean enabled) {
        this.enabled = enabled;
    }

    public Integer getDisplayOrder() {
        return displayOrder;
    }

    public void setDisplayOrder(Integer displayOrder) {
        this.displayOrder = displayOrder;
    }

    public String getLangKey() {
        return langKey;
    }

    public void setLangKey(String langKey) {
        this.langKey = langKey;
    }

    public Long getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        PropertyDTO propertyDTO = (PropertyDTO) o;
        if(propertyDTO.getId() == null || getId() == null) {
            return false;
        }
        return Objects.equals(getId(), propertyDTO.getId());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(getId());
    }

    @Override
    public String toString() {
        return "PropertyDTO{" +
            "id=" + getId() +
            ", name='" + getName() + "'" +
            ", aliasEnabled='" + isAliasEnabled() + "'" +
            ", colorPro='" + isColorPro() + "'" +
            ", enumPro='" + isEnumPro() + "'" +
            ", inputPro='" + isInputPro() + "'" +
            ", skuPro='" + isSkuPro() + "'" +
            ", searchable='" + isSearchable() + "'" +
            ", filterable='" + isFilterable() + "'" +
            ", required='" + isRequired() + "'" +
            ", multable='" + isMultable() + "'" +
            ", enabled='" + isEnabled() + "'" +
            ", displayOrder='" + getDisplayOrder() + "'" +
            ", langKey='" + getLangKey() + "'" +
            ", categoryId='" + getCategoryId() + "'" +
            "}";
    }
}
